package com.xingkong.behavior.model;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class Vertex implements Serializable{
	private String ID;
	
	public String getID() {
		return ID;
	}
	private double threshold;
	

	private boolean active=false;
	private Double x;
	public Double getX() {
		return x;
	}
	public Double getY() {
		return y;
	}
	public Double getSize() {
		return size;
	}
	public String getLabel() {
		return label;
	}
	private Double y;
	private Double size;
	private String label;

	private Map<String,Double> inVertexMap=new HashMap<String,Double>();
	public Vertex(String ID,Double x,Double y,Double size,String label,double threshold){
		this.ID=ID;
		this.label=label;
		this.threshold=threshold;
	}
	public double getThreshold() {
		return threshold;
	}
	public void setActive(boolean active) {
		this.active = active;
	}
	public boolean isActive() {
		return active;
	}
	
	public Map<String,Double> getInVertexMap() {
		return inVertexMap;
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return this.ID+":"+this.active;
	}
	@Override
	public boolean equals(Object obj) {
		// TODO Auto-generated method stub
		if (obj != null) {
            if (obj instanceof Vertex) {
            	Vertex w = (Vertex) obj;
                if (w.getID().equals(this.getID())&&(w.isActive()==this.isActive()))
                    return true;
            }
        }
        return false;
	}
	
	
}
